
const errHandler = (err , req , res , next) => {
    if(err === 1) {
        return res.send({code:0,msg:'参数错误'})
    }
    if(err === 2) {
        return res.send({code:0,msg:'token失效'})
    }
    if(err === 3) {
        return res.send({code:0,msg:'服务器错误'})
    }
    next();
}

exports.errHandler = errHandler ;